<?php 
	$domain = $site['domain'];
	$tipModel = new TipManager();
	$tipArray = $tipModel->getTipByFields( array('domain' => $domain, 'controller_view' => 'default_index') );
	$tips = isset($tipArray[$domain]['default_index'])? $tipArray[$domain]['default_index'] : array();

?>


<div id="nav" style="overflow:visible;">
	<ul>
		<li class="current"><a href="<?php echo url('default/index'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_01.png" alt=""
				 /> </a></li>
		<li style="position:relative; overflow:visible;">
			<?php if(isset($user['credit']) && ($user['credit'] == 0)){$_COOKIE['credittip'] = 'displayed';} 
				  if(isset($_COOKIE['credittip']) && $_COOKIE['credittip'] == 'new' || !isset($_COOKIE['credittip'])):
				  		if(isset($tips['credit-tip'])): ?>
					<div id="credit-tip" style="width:<?php echo $tips['credit-tip']['tip_width'] ?>; <?php if((isset($user['credit']) && ($user['credit'] != 0) || !isset($user['credit']))){echo "display:none;";}else{} ?> position:absolute; left:-135px; top:-60px; border:solid 2px #FFF; background-color:<?php echo $tips['credit-tip']['bg_color'] ?>">
						<div style="color:#FFF; position:absolute; left:190px; top:24px; font-size:16px;">◆</div>
		    			<div style="color:<?php echo $tips['credit-tip']['bg_color'] ?>; position:absolute; left:190px; top:22px; font-size:16px;">◆</div>
		    			<p style="margin:<?php echo $tips['credit-tip']['tip_padding'] ?>; font-size:<?php echo $tips['credit-tip']['font_size'] ?>; color:<?php echo $tips['credit-tip']['font_color'] ?>; font-weight:bolder; line-height:<?php echo $tips['credit-tip']['tip_lineheight'] ?>; height:<?php echo $tips['credit-tip']['tip_height'] ?>; "><?php echo $tips['credit-tip']['tip_text'] ?></p>
					</div>
			<?php		endif; 
				 endif; ?>
			<a href="<?php echo url('offer/morecredit'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_02.png" alt=""
				/> </a></li>
		<li><a href="<?php echo url('common/leaderboard'); ?>"
			title=""><img src="<?php echo $img_url; ?>nav_button_03.png" alt=""
				 /> </a></li>
		
		<?php 
			if (!isset($user))
			{
		?>
			<li>
				<a href="<?php echo url('user/register'); ?>" title=""><img src="<?php echo $img_url; ?>nav_button_04.png" alt="" /></a>
			</li>
		<?php }?>
			
		<li><a href="<?php echo url('user/account'); ?>" title=""><img
				src="<?php echo $img_url; ?>nav_button_05.png" alt="" /> </a></li>
		<li class="clear"></li>
	</ul>
</div>
